<template>
    <div class="header-container">
        <!-- 左侧按钮区域 -->
        <div class="left">
            <el-button icon="el-icon-menu" size="mini" @click="changeCollpse"></el-button>
            <!-- 当前的页面 -->
            <!-- <p></p> -->
        </div>
        <!-- 右侧退出区域 -->
        <div class="right">
            <el-dropdown>
              <span class="el-dropdown-link">
                <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>个人中心</el-dropdown-item>
                <el-dropdown-item>退出登录</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
        </div>
    </div>
</template>

<script>
import bus from '@/EvenBus.js'
export default {
    data(){
        return{
            collpse: false
        }
    },  
    methods: {
        changeCollpse(){
            this.collpse = !this.collpse
            // console.log(this.collpse);
            bus.$emit("collpse", this.collpse)
        }
    },
}
</script>

<style lang="less" scoped>
    .header-container{
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .el-dropdown-link {
        cursor: pointer;
        color: #409EFF;
    }
    .el-icon-arrow-down {
        font-size: 12px;
    }
</style>